3.242 \(\int \frac{\cot ^5(e+f x)}{(a+b \tan ^2(e+f x))^3} \, dx\)

Optimal. Leaf size=210 \[ -\frac{b^3 (4 a-3 b)}{2 a^4 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac{b^3}{4 a^3 f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}+\frac{b^3 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^5 f (a-b)^3}+\frac{\left (a^2+3 a b+6 b^2\right ) \log (\tan (e+f x))}{a^5 f}+\frac{(a+3 b) \cot ^2(e+f x)}{2 a^4 f}-\frac{\cot ^4(e+f x)}{4 a^3 f}+\frac{\log (\cos (e+f x))}{f (a-b)^3} \]

[Out]

((a + 3*b)*Cot[e + f*x]^2)/(2*a^4*f) - Cot[e + f*x]^4/(4*a^3*f) + Log[Cos[e + f*x]]/((a - b)^3*f) + ((a^2 + 3*
a*b + 6*b^2)*Log[Tan[e + f*x]])/(a^5*f) + (b^3*(10*a^2 - 15*a*b + 6*b^2)*Log[a + b*Tan[e + f*x]^2])/(2*a^5*(a
- b)^3*f) - b^3/(4*a^3*(a - b)*f*(a + b*Tan[e + f*x]^2)^2) - ((4*a - 3*b)*b^3)/(2*a^4*(a - b)^2*f*(a + b*Tan[e
 + f*x]^2))

________________________________________________________________________________________

Rubi [A]  time = 0.237839, antiderivative size = 210, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 23, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.13, Rules used = {3670, 446, 88} \[ -\frac{b^3 (4 a-3 b)}{2 a^4 f (a-b)^2 \left (a+b \tan ^2(e+f x)\right )}-\frac{b^3}{4 a^3 f (a-b) \left (a+b \tan ^2(e+f x)\right )^2}+\frac{b^3 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^5 f (a-b)^3}+\frac{\left (a^2+3 a b+6 b^2\right ) \log (\tan (e+f x))}{a^5 f}+\frac{(a+3 b) \cot ^2(e+f x)}{2 a^4 f}-\frac{\cot ^4(e+f x)}{4 a^3 f}+\frac{\log (\cos (e+f x))}{f (a-b)^3} \]

Antiderivative was successfully verified.

[In]

Int[Cot[e + f*x]^5/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

((a + 3*b)*Cot[e + f*x]^2)/(2*a^4*f) - Cot[e + f*x]^4/(4*a^3*f) + Log[Cos[e + f*x]]/((a - b)^3*f) + ((a^2 + 3*
a*b + 6*b^2)*Log[Tan[e + f*x]])/(a^5*f) + (b^3*(10*a^2 - 15*a*b + 6*b^2)*Log[a + b*Tan[e + f*x]^2])/(2*a^5*(a
- b)^3*f) - b^3/(4*a^3*(a - b)*f*(a + b*Tan[e + f*x]^2)^2) - ((4*a - 3*b)*b^3)/(2*a^4*(a - b)^2*f*(a + b*Tan[e
 + f*x]^2))

Rule 3670

Int[((d_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*((c_.)*tan[(e_.) + (f_.)*(x_)])^(n_))^(p_.), x_Symbol]
 :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Dist[(c*ff)/f, Subst[Int[(((d*ff*x)/c)^m*(a + b*(ff*x)^n)^p)/(c^
2 + ff^2*x^2), x], x, (c*Tan[e + f*x])/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && (IGtQ[p, 0] || EqQ
[n, 2] || EqQ[n, 4] || (IntegerQ[p] && RationalQ[n]))

Rule 446

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rubi steps

\begin{align*} \int \frac{\cot ^5(e+f x)}{\left (a+b \tan ^2(e+f x)\right )^3} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^5 \left (1+x^2\right ) \left (a+b x^2\right )^3} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{\operatorname{Subst}\left (\int \frac{1}{x^3 (1+x) (a+b x)^3} \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{a^3 x^3}+\frac{-a-3 b}{a^4 x^2}+\frac{a^2+3 a b+6 b^2}{a^5 x}-\frac{1}{(a-b)^3 (1+x)}+\frac{b^4}{a^3 (a-b) (a+b x)^3}+\frac{(4 a-3 b) b^4}{a^4 (a-b)^2 (a+b x)^2}+\frac{b^4 \left (10 a^2-15 a b+6 b^2\right )}{a^5 (a-b)^3 (a+b x)}\right ) \, dx,x,\tan ^2(e+f x)\right )}{2 f}\\ &=\frac{(a+3 b) \cot ^2(e+f x)}{2 a^4 f}-\frac{\cot ^4(e+f x)}{4 a^3 f}+\frac{\log (\cos (e+f x))}{(a-b)^3 f}+\frac{\left (a^2+3 a b+6 b^2\right ) \log (\tan (e+f x))}{a^5 f}+\frac{b^3 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )}{2 a^5 (a-b)^3 f}-\frac{b^3}{4 a^3 (a-b) f \left (a+b \tan ^2(e+f x)\right )^2}-\frac{(4 a-3 b) b^3}{2 a^4 (a-b)^2 f \left (a+b \tan ^2(e+f x)\right )}\\ \end{align*}

Mathematica [A]  time = 2.4705, size = 178, normalized size = 0.85 \[ \frac{\frac{\frac{b^3 \left (2 \left (10 a^2-15 a b+6 b^2\right ) \log \left (a+b \tan ^2(e+f x)\right )-\frac{a (a-b) \left (2 b (4 a-3 b) \tan ^2(e+f x)+a (9 a-7 b)\right )}{\left (a+b \tan ^2(e+f x)\right )^2}\right )}{(a-b)^3}+4 \left (a^2+3 a b+6 b^2\right ) \log (\tan (e+f x))}{2 a^5}+\frac{(a+3 b) \cot ^2(e+f x)}{a^4}-\frac{\cot ^4(e+f x)}{2 a^3}+\frac{2 \log (\cos (e+f x))}{(a-b)^3}}{2 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[e + f*x]^5/(a + b*Tan[e + f*x]^2)^3,x]

[Out]

(((a + 3*b)*Cot[e + f*x]^2)/a^4 - Cot[e + f*x]^4/(2*a^3) + (2*Log[Cos[e + f*x]])/(a - b)^3 + (4*(a^2 + 3*a*b +
 6*b^2)*Log[Tan[e + f*x]] + (b^3*(2*(10*a^2 - 15*a*b + 6*b^2)*Log[a + b*Tan[e + f*x]^2] - (a*(a - b)*(a*(9*a -
 7*b) + 2*(4*a - 3*b)*b*Tan[e + f*x]^2))/(a + b*Tan[e + f*x]^2)^2))/(a - b)^3)/(2*a^5))/(2*f)

________________________________________________________________________________________

Maple [B]  time = 0.109, size = 477, normalized size = 2.3 \begin{align*} -{\frac{1}{16\,f{a}^{3} \left ( \cos \left ( fx+e \right ) +1 \right ) ^{2}}}+{\frac{7}{16\,f{a}^{3} \left ( \cos \left ( fx+e \right ) +1 \right ) }}+{\frac{3\,b}{4\,f{a}^{4} \left ( \cos \left ( fx+e \right ) +1 \right ) }}+{\frac{\ln \left ( \cos \left ( fx+e \right ) +1 \right ) }{2\,f{a}^{3}}}+{\frac{3\,\ln \left ( \cos \left ( fx+e \right ) +1 \right ) b}{2\,f{a}^{4}}}+3\,{\frac{\ln \left ( \cos \left ( fx+e \right ) +1 \right ){b}^{2}}{f{a}^{5}}}+5\,{\frac{{b}^{3}\ln \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }{f{a}^{3} \left ( a-b \right ) ^{3}}}-{\frac{15\,{b}^{4}\ln \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }{2\,f{a}^{4} \left ( a-b \right ) ^{3}}}+3\,{\frac{{b}^{5}\ln \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }{f{a}^{5} \left ( a-b \right ) ^{3}}}+{\frac{5\,{b}^{4}}{2\,f{a}^{3} \left ( a-b \right ) ^{3} \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }}-{\frac{3\,{b}^{5}}{2\,f{a}^{4} \left ( a-b \right ) ^{3} \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) }}-{\frac{{b}^{5}}{4\,f{a}^{3} \left ( a-b \right ) ^{3} \left ( a \left ( \cos \left ( fx+e \right ) \right ) ^{2}- \left ( \cos \left ( fx+e \right ) \right ) ^{2}b+b \right ) ^{2}}}-{\frac{1}{16\,f{a}^{3} \left ( \cos \left ( fx+e \right ) -1 \right ) ^{2}}}-{\frac{7}{16\,f{a}^{3} \left ( \cos \left ( fx+e \right ) -1 \right ) }}-{\frac{3\,b}{4\,f{a}^{4} \left ( \cos \left ( fx+e \right ) -1 \right ) }}+{\frac{\ln \left ( \cos \left ( fx+e \right ) -1 \right ) }{2\,f{a}^{3}}}+{\frac{3\,\ln \left ( \cos \left ( fx+e \right ) -1 \right ) b}{2\,f{a}^{4}}}+3\,{\frac{\ln \left ( \cos \left ( fx+e \right ) -1 \right ){b}^{2}}{f{a}^{5}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x)

[Out]

-1/16/f/a^3/(cos(f*x+e)+1)^2+7/16/f/a^3/(cos(f*x+e)+1)+3/4/f/a^4/(cos(f*x+e)+1)*b+1/2/f/a^3*ln(cos(f*x+e)+1)+3
/2/f/a^4*ln(cos(f*x+e)+1)*b+3/f/a^5*ln(cos(f*x+e)+1)*b^2+5/f*b^3/a^3/(a-b)^3*ln(a*cos(f*x+e)^2-cos(f*x+e)^2*b+
b)-15/2/f*b^4/a^4/(a-b)^3*ln(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)+3/f*b^5/a^5/(a-b)^3*ln(a*cos(f*x+e)^2-cos(f*x+e)
^2*b+b)+5/2/f*b^4/a^3/(a-b)^3/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)-3/2/f*b^5/a^4/(a-b)^3/(a*cos(f*x+e)^2-cos(f*x+
e)^2*b+b)-1/4/f*b^5/a^3/(a-b)^3/(a*cos(f*x+e)^2-cos(f*x+e)^2*b+b)^2-1/16/f/a^3/(cos(f*x+e)-1)^2-7/16/f/a^3/(co
s(f*x+e)-1)-3/4/f/a^4/(cos(f*x+e)-1)*b+1/2/f/a^3*ln(cos(f*x+e)-1)+3/2/f/a^4*ln(cos(f*x+e)-1)*b+3/f/a^5*ln(cos(
f*x+e)-1)*b^2

________________________________________________________________________________________

Maxima [B]  time = 1.18268, size = 562, normalized size = 2.68 \begin{align*} \frac{\frac{2 \,{\left (10 \, a^{2} b^{3} - 15 \, a b^{4} + 6 \, b^{5}\right )} \log \left (-{\left (a - b\right )} \sin \left (f x + e\right )^{2} + a\right )}{a^{8} - 3 \, a^{7} b + 3 \, a^{6} b^{2} - a^{5} b^{3}} + \frac{2 \,{\left (2 \, a^{6} - 7 \, a^{5} b + 5 \, a^{4} b^{2} + 10 \, a^{3} b^{3} - 25 \, a^{2} b^{4} + 21 \, a b^{5} - 6 \, b^{6}\right )} \sin \left (f x + e\right )^{6} - a^{6} + 3 \, a^{5} b - 3 \, a^{4} b^{2} + a^{3} b^{3} -{\left (9 \, a^{6} - 25 \, a^{5} b + 10 \, a^{4} b^{2} + 30 \, a^{3} b^{3} - 45 \, a^{2} b^{4} + 18 \, a b^{5}\right )} \sin \left (f x + e\right )^{4} + 2 \,{\left (3 \, a^{6} - 7 \, a^{5} b + 3 \, a^{4} b^{2} + 3 \, a^{3} b^{3} - 2 \, a^{2} b^{4}\right )} \sin \left (f x + e\right )^{2}}{{\left (a^{9} - 5 \, a^{8} b + 10 \, a^{7} b^{2} - 10 \, a^{6} b^{3} + 5 \, a^{5} b^{4} - a^{4} b^{5}\right )} \sin \left (f x + e\right )^{8} - 2 \,{\left (a^{9} - 4 \, a^{8} b + 6 \, a^{7} b^{2} - 4 \, a^{6} b^{3} + a^{5} b^{4}\right )} \sin \left (f x + e\right )^{6} +{\left (a^{9} - 3 \, a^{8} b + 3 \, a^{7} b^{2} - a^{6} b^{3}\right )} \sin \left (f x + e\right )^{4}} + \frac{2 \,{\left (a^{2} + 3 \, a b + 6 \, b^{2}\right )} \log \left (\sin \left (f x + e\right )^{2}\right )}{a^{5}}}{4 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="maxima")

[Out]

1/4*(2*(10*a^2*b^3 - 15*a*b^4 + 6*b^5)*log(-(a - b)*sin(f*x + e)^2 + a)/(a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3)
+ (2*(2*a^6 - 7*a^5*b + 5*a^4*b^2 + 10*a^3*b^3 - 25*a^2*b^4 + 21*a*b^5 - 6*b^6)*sin(f*x + e)^6 - a^6 + 3*a^5*b
 - 3*a^4*b^2 + a^3*b^3 - (9*a^6 - 25*a^5*b + 10*a^4*b^2 + 30*a^3*b^3 - 45*a^2*b^4 + 18*a*b^5)*sin(f*x + e)^4 +
 2*(3*a^6 - 7*a^5*b + 3*a^4*b^2 + 3*a^3*b^3 - 2*a^2*b^4)*sin(f*x + e)^2)/((a^9 - 5*a^8*b + 10*a^7*b^2 - 10*a^6
*b^3 + 5*a^5*b^4 - a^4*b^5)*sin(f*x + e)^8 - 2*(a^9 - 4*a^8*b + 6*a^7*b^2 - 4*a^6*b^3 + a^5*b^4)*sin(f*x + e)^
6 + (a^9 - 3*a^8*b + 3*a^7*b^2 - a^6*b^3)*sin(f*x + e)^4) + 2*(a^2 + 3*a*b + 6*b^2)*log(sin(f*x + e)^2)/a^5)/f

________________________________________________________________________________________

Fricas [B]  time = 2.32967, size = 1324, normalized size = 6.3 \begin{align*} \frac{3 \,{\left (a^{5} b^{2} - a^{4} b^{3} - 3 \, a^{3} b^{4} + 8 \, a^{2} b^{5} - 4 \, a b^{6}\right )} \tan \left (f x + e\right )^{8} - a^{7} + 3 \, a^{6} b - 3 \, a^{5} b^{2} + a^{4} b^{3} + 2 \,{\left (3 \, a^{6} b - 2 \, a^{5} b^{2} - 9 \, a^{4} b^{3} + 14 \, a^{3} b^{4} + 3 \, a^{2} b^{5} - 6 \, a b^{6}\right )} \tan \left (f x + e\right )^{6} +{\left (3 \, a^{7} + a^{6} b - 10 \, a^{5} b^{2} - 6 \, a^{4} b^{3} + 33 \, a^{3} b^{4} - 18 \, a^{2} b^{5}\right )} \tan \left (f x + e\right )^{4} + 2 \,{\left (a^{7} - a^{6} b - 3 \, a^{5} b^{2} + 5 \, a^{4} b^{3} - 2 \, a^{3} b^{4}\right )} \tan \left (f x + e\right )^{2} + 2 \,{\left ({\left (a^{5} b^{2} - 10 \, a^{2} b^{5} + 15 \, a b^{6} - 6 \, b^{7}\right )} \tan \left (f x + e\right )^{8} + 2 \,{\left (a^{6} b - 10 \, a^{3} b^{4} + 15 \, a^{2} b^{5} - 6 \, a b^{6}\right )} \tan \left (f x + e\right )^{6} +{\left (a^{7} - 10 \, a^{4} b^{3} + 15 \, a^{3} b^{4} - 6 \, a^{2} b^{5}\right )} \tan \left (f x + e\right )^{4}\right )} \log \left (\frac{\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) + 2 \,{\left ({\left (10 \, a^{2} b^{5} - 15 \, a b^{6} + 6 \, b^{7}\right )} \tan \left (f x + e\right )^{8} + 2 \,{\left (10 \, a^{3} b^{4} - 15 \, a^{2} b^{5} + 6 \, a b^{6}\right )} \tan \left (f x + e\right )^{6} +{\left (10 \, a^{4} b^{3} - 15 \, a^{3} b^{4} + 6 \, a^{2} b^{5}\right )} \tan \left (f x + e\right )^{4}\right )} \log \left (\frac{b \tan \left (f x + e\right )^{2} + a}{\tan \left (f x + e\right )^{2} + 1}\right )}{4 \,{\left ({\left (a^{8} b^{2} - 3 \, a^{7} b^{3} + 3 \, a^{6} b^{4} - a^{5} b^{5}\right )} f \tan \left (f x + e\right )^{8} + 2 \,{\left (a^{9} b - 3 \, a^{8} b^{2} + 3 \, a^{7} b^{3} - a^{6} b^{4}\right )} f \tan \left (f x + e\right )^{6} +{\left (a^{10} - 3 \, a^{9} b + 3 \, a^{8} b^{2} - a^{7} b^{3}\right )} f \tan \left (f x + e\right )^{4}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="fricas")

[Out]

1/4*(3*(a^5*b^2 - a^4*b^3 - 3*a^3*b^4 + 8*a^2*b^5 - 4*a*b^6)*tan(f*x + e)^8 - a^7 + 3*a^6*b - 3*a^5*b^2 + a^4*
b^3 + 2*(3*a^6*b - 2*a^5*b^2 - 9*a^4*b^3 + 14*a^3*b^4 + 3*a^2*b^5 - 6*a*b^6)*tan(f*x + e)^6 + (3*a^7 + a^6*b -
 10*a^5*b^2 - 6*a^4*b^3 + 33*a^3*b^4 - 18*a^2*b^5)*tan(f*x + e)^4 + 2*(a^7 - a^6*b - 3*a^5*b^2 + 5*a^4*b^3 - 2
*a^3*b^4)*tan(f*x + e)^2 + 2*((a^5*b^2 - 10*a^2*b^5 + 15*a*b^6 - 6*b^7)*tan(f*x + e)^8 + 2*(a^6*b - 10*a^3*b^4
 + 15*a^2*b^5 - 6*a*b^6)*tan(f*x + e)^6 + (a^7 - 10*a^4*b^3 + 15*a^3*b^4 - 6*a^2*b^5)*tan(f*x + e)^4)*log(tan(
f*x + e)^2/(tan(f*x + e)^2 + 1)) + 2*((10*a^2*b^5 - 15*a*b^6 + 6*b^7)*tan(f*x + e)^8 + 2*(10*a^3*b^4 - 15*a^2*
b^5 + 6*a*b^6)*tan(f*x + e)^6 + (10*a^4*b^3 - 15*a^3*b^4 + 6*a^2*b^5)*tan(f*x + e)^4)*log((b*tan(f*x + e)^2 +
a)/(tan(f*x + e)^2 + 1)))/((a^8*b^2 - 3*a^7*b^3 + 3*a^6*b^4 - a^5*b^5)*f*tan(f*x + e)^8 + 2*(a^9*b - 3*a^8*b^2
 + 3*a^7*b^3 - a^6*b^4)*f*tan(f*x + e)^6 + (a^10 - 3*a^9*b + 3*a^8*b^2 - a^7*b^3)*f*tan(f*x + e)^4)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)**5/(a+b*tan(f*x+e)**2)**3,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [B]  time = 1.77064, size = 2016, normalized size = 9.6 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(f*x+e)^5/(a+b*tan(f*x+e)^2)^3,x, algorithm="giac")

[Out]

1/64*(32*(10*a^2*b^3 - 15*a*b^4 + 6*b^5)*log(a + 2*a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 4*b*(cos(f*x + e)
 - 1)/(cos(f*x + e) + 1) + a*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)/(a^8 - 3*a^7*b + 3*a^6*b^2 - a^5*b^3)
- 64*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 1)/(a^3 - 3*a^2*b + 3*a*b^2 - b^3) - (a^7 - 3*a^6*b + 3*a^5*
b^2 - a^4*b^3 + 16*a^7*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 32*a^6*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1)
+ 32*a^4*b^3*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) - 16*a^3*b^4*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 70*a^7
*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 178*a^6*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 34*a^5*b^2*
(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 586*a^4*b^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 - 752*a^3*b^
4*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 272*a^2*b^5*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + 140*a^7*
(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 412*a^6*b*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 204*a^5*b^2*
(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 1356*a^4*b^3*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 3272*a^3*
b^4*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 2496*a^2*b^5*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 - 640*a
*b^6*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3 + 145*a^7*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 - 403*a^6*b
*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 211*a^5*b^2*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 1487*a^4*
b^3*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 - 3296*a^3*b^4*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 2560*
a^2*b^5*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 - 256*a*b^6*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 - 256*
b^7*(cos(f*x + e) - 1)^4/(cos(f*x + e) + 1)^4 + 76*a^7*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 - 140*a^6*b*(
cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 - 36*a^5*b^2*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 + 700*a^4*b^3*
(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 - 1624*a^3*b^4*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 + 1152*a^2*
b^5*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 - 256*a*b^6*(cos(f*x + e) - 1)^5/(cos(f*x + e) + 1)^5 + 16*a^7*(
cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6 + 160*a^4*b^3*(cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6 - 240*a^3*b^4
*(cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6 + 96*a^2*b^5*(cos(f*x + e) - 1)^6/(cos(f*x + e) + 1)^6)/((a^8 - 3*a
^7*b + 3*a^6*b^2 - a^5*b^3)*(a*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + 2*a*(cos(f*x + e) - 1)^2/(cos(f*x + e)
+ 1)^2 - 4*b*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2 + a*(cos(f*x + e) - 1)^3/(cos(f*x + e) + 1)^3)^2) + 32*
(a^2 + 3*a*b + 6*b^2)*log(-(cos(f*x + e) - 1)/(cos(f*x + e) + 1))/a^5 - (12*a^3*(cos(f*x + e) - 1)/(cos(f*x +
e) + 1) + 24*a^2*b*(cos(f*x + e) - 1)/(cos(f*x + e) + 1) + a^3*(cos(f*x + e) - 1)^2/(cos(f*x + e) + 1)^2)/a^6)
/f